<include file="Public:header" />
<script type="text/javascript" src="__PUBLIC__/Admin/js/jquery.js"></script>
<script type="text/javascript" src="__PUBLIC__/Index/js/idcardno.js"></script>
<script type="text/javascript" src="__PUBLIC__/Index/js/pwd.js"></script>
<script type="text/javascript" src="__PUBLIC__/Index/js/city.js"></script>
<SCRIPT type="text/javascript">

//** Power by Fason(2004-3-11)
//** Email:fason_pfx@hotmail.com

var s=["s1","s2","s3"];
var opt0 = ["省份","地级市","市、县级市、县"];
function setup()
{
for(i=0;i<s.length-1;i++)
  document.getElementById(s[i]).onchange=new Function("change("+(i+1)+")");
change(0);
}
//-->
</SCRIPT>

<script>
	function frmSubmit(){
		var type = 0;
		if($("#checkEmail").val() == ''){
			$("#emails").html('<font color=\"red\">请填写您的邮箱</font>');
			type += 1;
		}
		 if($("#pwd").val() == ''){
			$("#checkpwd").html("<font color=\"red\">请填写您的密码</font>");
			type += 1;
		}
		 if($("#agpwd").val() != $("#agpwd").val()){
			$("#pwdtishi").html("<font color=\"red\">两次密码输入不一致</font>");
			type += 1;
		}else if($("#agpwd").val() == ''){
			$("#pwdtishi").html("<font color=\"red\">请填写您的密码</font>");
			type += 1;
		}
		 if($("#chknumber").val() == ''){
			$("#checkCode").html("<font color=\"red\">请输入验证码</font>");
			type += 1;
		}
		if(type){
			return false;
		}else{
			return true
		}

	}
</script>
<script type="text/javascript">
	function changeImg(){
		document.getElementById("safecode").src = "__APP__/Register/verify/"+new Date();
	}	
</script>
<script>
	function checks(n){
		var fun = "checks";
		$.ajax({
			async:false,
			type:'POST',
			url:'__APP__/Register/index',
			data:'type='+n+"&fun="+fun,
			success:function(msg){
				$("#content").html(msg);
			}
		});
	}
</script>

<script>
	function checkusername(){

		var username = document.getElementById("username").value;
		var fun = "checkusername";	
		$.ajax({
			async:false,
			type:'POST',
			url:'__APP__/Register/index',
			data:'username='+username+"&fun="+fun,
			success:function(msg){

				$("#panduan").html(msg);
			}
		});
	
	}
</script>

<script>
	function checkpwd(){
		var agpwd = document.getElementById("agpwd").value;
		var fun = "agpwd";
		$.ajax({
			async:false,
			type:'POST',
			url:'__APP__/Register/index',
			data:'agpwd='+agpwd+"&fun="+fun,
			success:function(msg){
				$("#pwdtishi").html(msg);
			}
		});
	}
</script>
<script>
	function checkmail(mail){
		$.post("__APP__/Register/index",{'checkEmail':mail,'fun':'email'},function(msg){
			if(msg == 'has'){
				$("#emails").html("<font color=\"red\">邮箱已注册</font>");
				
			}else if(msg == 'empty'){
				$("#emails").html('<font color=\"red\">请填写您的邮箱</font>');
				
			}else{
				var reg = /\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/;
				if(reg.test(mail) == false){
					$("#emails").html("<font color=\"red\">邮箱格式不正确</font>");
					
				}else{
					$("#emails").html("<font color=\"green\">邮箱可用</font>");
					
				}
			}
		});
	}
</script>

<script>
	function checktel(tel){
		var tels = "tels";
		$.ajax({
			async:false,
			type:'POST',
			url:'__APP__/Register/index',
			data:'tel='+tel+"&fun="+tels,
			success:function(msg){
				if(msg=='empty'){
					$("#tels").html("<font color=\"red\">手机号码不能为空</font>");		
				}
				
				if(msg=='has'){
					$("#tels").html("<font color=\"red\">手机号码已存在</font>");
				}
				if(msg=='flase'){
					$("#tels").html("<font color=\"red\">格式不正确</font>");
				}
				if(msg=='ture'){
					$("#tels").html("<font color=\"green\">可用</font>");
				}
			}
		});
	}
</script>

<script>
	function checkimg(n){
		if(n==''){
			$("#imgtishi").html("<font color=\"red\">图片不能为空</font>");
		}else{
			$("#imgtishi").html("<font color=\"red\">可用</font>");
		}
	}
</script>
<div class="clr"></div>
<div class="loginti">
  <div class="login_weizhi"><ul><li>会员中心 > 填写注册信息</li>
    <li style="float:right;"><a href="#">会员介绍</a> | <a href="#">返回首页</a></li>
    </ul>
  </div>
  
    <div class="login_zong">
      <div class="loginti_left"><ul><li style="font-size:16px; font-weight:bold; color:#535353;">注册</li>
        <li class="loginti_anquan">带红色<span class="dahongzi">*</span>为必填项，如果不全将无法注册！</li>
        <li><div id="loginyemian">
 
<div id="content">
	<form action="__APP__/Register/index" method="POST" enctype="multipart/form-data" onsubmit="return frmSubmit()">
    <dl>
     <dd><span class="dahongzi">* </span>会员类型：</dd>
     <dt>
       <label>
         <input name="RadioGroup1" type="radio" value="经纪人"  checked />
         经纪人</label>
    
       <label>
         <input type="radio" name="RadioGroup1" value="经纪公司" onclick="checks(2)"  />
         经纪公司</label>
   
       <label>
         <input type="radio" name="RadioGroup1" value="物业" onclick="checks(3)"  />
         物业</label>
      
       <label>
         <input type="radio" name="RadioGroup1" value="个人" onclick="checks(4)"  />
         个人</label></dt>
      
     <dt>     </dt>
    </dl>
	<dl>
     <dd><span class="dahongzi">* </span>用户名：</dd>
     <dt>
       <input name="username" type="text"  / class="zhucezcan" id="username" onBlur="checkusername()"/>  <div id="panduan"></div>   </dt>
    </dl>
    <dl>
     <dd><span class="dahongzi">* </span>密&nbsp;&nbsp; 码：</dd>
     <dt>
       <input name="pwd" / class="zhucezcan" onBlur="pwStrength(this.value)" id="pwd"/><span id="Checkpwd"></span>   </dt>
    </dl>
	<dl>
     <dd>&nbsp;</dd>
     <dt> <table id="t1" width="217" border="1" cellspacing="0" cellpadding="1" bordercolor="#cccccc" height="10" style='display:inline'> 
	  <tr align="center" bgcolor="#eeeeee"> 
	   <td width="70px" id="strength_L">弱</td> 
	   <td width="70px" id="strength_M">中</td> 
	   <td width="70px" id="strength_H">强</td> 
	  </tr></table> <span class="xiaohuizi">密码强度</span></dt>
    </dl>
	<dl>
     <dd><span class="dahongzi">* </span>确认密码：</dd>
     <dt>
       <input name="agpwd" type="text" id="agpwd" / class="zhucezcan" onBlur="checkpwd()" /><div id="pwdtishi"></div></dt>
    </dl>

	<dl>
     <dd><span class="dahongzi">* </span>上传本人照片：</dd>
     <dt>
       <input name="img" id="img" type="file" / class="zhucezcan" onBlur="checkimg(this.value)" /><div id="imgtishi"></div></dt>

    </dl>

	<dl>    
		<dd><span class="dahongzi">* </span>性别：</dd>	 

		<dt><select id="xingbie1" >
		<option value="-1">-请选择-</option>
		<option value="男">男</option>
		<option value="女">女</option>    </dt>     
		</select>
	</dl>
	<dl>
     <dd><span class="dahongzi">* </span>身份证号：</dd>	 
     <dt><input name="Jmsfzh1"  id="Jmsfzh1" type="text" class="zhucezcan" value="" onBlur="checkid()"></dt>
	</dl>
	<dl>
     <dd><span class="dahongzi">* </span>邮箱：</dd>
     <dt><input type="text" class="zhucezcan"  name="email" id="checkEmail" onBlur="checkmail(this.value)"><span id="emails"></span></dt>
	</dl>
	<dl>
     <dd><span class="dahongzi">* </span>手机号：</dd>
     <dt><input type="text" class="zhucezcan"  name="tel" id="tel" onBlur="checktel(this.value)"><span id="tels"></span></dt>
	</dl>

	<dl>
     <dd><span class="dahongzi">* </span>公司名：</dd>
     <dt><input type="text" class="zhucezcan"  name="company" id="company" onBlur="checkcomp(this.value)"><span id="company"></span></dt>
	</dl>

	<dl>
     <dd><span class="dahongzi">* </span>密保问题：</dd>
     <dt class="listbiao">
       <select name="mibao" size="1">
         <option value="">选择密保查询问题</option>
         <option value="我最喜欢什么？">我最喜欢什么？</option>
         <option value="我中学时班主任是谁？">我中学时班主任是谁？</option>
       </select>   </dt>
    </dl>
	<dl>
     <dd><span class="dahongzi1">自定义密保问题</span>：</dd>
     <dt>
       <input name="diymibao" / class="zhucezcan" />   </dt>
    </dl>
	<dl>
     <dd><span class="dahongzi">* </span>密保问题答案：</dd>
     <dt>
       <input name="answer" / class="zhucezcan" />   </dt>
    </dl>
	<dl>
     <dd><span class="dahongzi">* </span>居住地：</dd>
     <dt class="listbiaobiao" onload="setup()">
  <span style="float:left;">
    <select name="sheng" id="sheng" onchange="displayShi()">
  <option value=0>--请选择--</option>
  <option value=北京>北京</option>
  <option value=上海>上海</option>
  <option value=天津>天津</option>
  <option value=重庆>重庆</option>
  <option value=河北>河北省</option>
  <option value=山西>山西省</option>
  <option value=辽宁>辽宁省</option>
  <option value=吉林>吉林省</option>
  <option value=黑龙江>黑龙江省</option>
  <option value=江苏>江苏省</option>
  <option value=浙江>浙江省</option>
  <option value=安徽>安徽省</option>
  <option value=福建>福建省</option>
  <option value=江西>江西省</option>
  <option value=山东>山东省</option>
  <option value=河南>河南省</option>
  <option value=湖北>湖北省</option>
  <option value=湖南>湖南省</option>
  <option value=广东>广东省</option>
  <option value=海南>海南省</option>
  <option value=四川>四川省</option>
  <option value=贵州>贵州省</option>
  <option value=云南>云南省</option>
  <option value=陕西>陕西省</option>
  <option value=甘肃>甘肃省</option>
  <option value=青海>青海省</option>
  <option value=内蒙古自治区>内蒙古自治区</option>
  <option value=广西壮族自治区>广西壮族自治区</option>
  <option value=西藏自治区>西藏自治区</option>
  <option value=宁夏回族自治区>宁夏回族自治区</option>
  <option value=新疆维吾尔自治区>新疆维吾尔自治区</option>
     </select>
  </span>
  <span style="float:left">
     <select name="shi" id="shi" onchange="displayXian()"  style="display:none" >
  <option value=0>--请选择--</option>
     </select>
  </span>
  <span style="float:left">
     <select name="xian" id="xian" style="display:none" onchange="set_text()">
        <option value=0>--请选择--</option>
     </select>
  </span></dt></dl>
	   <dl>
     <dd><span class="dahongzi">* </span>验证码：</dd>
     <dt>
       <input name="verify" / class="zhucezcan" id="chknumber" type="text" onblur="checkCode(this.value)"/>		<a href="javascript:void()" onclick="changeImg();return false;" title="看不清楚，换一张"><img src="__APP__/Register/verify/" id="safecode" />换一换</a><span id='checkCode' style="color:red;margin-left:10px;"></span>
		
	 
	 </dt>
    </dl>
	<dl><dd>&nbsp;&nbsp;</dd>
	  <dt>
	    <input name="Input" type="checkbox" value="" /> 
	    我接受<a href="#"><span class="xiaolanzi">《用户注册协议书》 </span></a></dt> 
	</dl>
	<dl><dd>&nbsp;&nbsp;</dd><dt><input type="submit" class="zhucetijiaobutton" value="  " />
	</dt> </dl>
	<input type="hidden" value="register" name="fun">
	<input type="hidden" value="1" name="type">
	</form>
	</div>
   </div></li></ul>
      </div>
      <div class="loginti_right">
        <div style="width:150px; margin:80px 0 0 50px; line-height:40px;">已经拥有账号？<br />
        <a href="__APP__/Login/index/"><img src="__PUBLIC__/Admin/images/zc_03.jpg" width="90" height="27" /></a></div>
      </div>
    </div>
</div>
<include file="Public:foot" />